package com.murray.shop.background.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Murray
 * @Date 2021/8/19
 * @Time 23:28
 */
@ControllerAdvice
public class UnifyExceptionHandler {

    @ExceptionHandler(Exception.class)
    @RequestMapping("/error")
    public String exceptionHandler(){
        return "error";
    }

}
